<template>
  <!-- 底部部分 -->
  <footer class="footer">
    <span class="todo-count"
      ><strong>{{ count }}</strong
      >剩余</span
    >
    <ul class="filters">
      <li>
        <a :class="{ selected: ' all ' }" href="#/" @click="changeall">全部</a>
      </li>
      <li>
        <a href="#/active" :class="{ selected: 'active' }" @click="changefor">进行中</a>
      </li>
      <li>
        <a href="#/completed" :class="{ selected: 'completed' }" @click="changesuc">已完成</a>
      </li>
    </ul>
    <button class="clear-completed" @click="delsubmit">清除已完成</button>
  </footer>
</template>

<script>
export default {
  components: {},
  props: {
    count: {
      type: Number,
      required: true
    },
    type: {
      type: String,
      required: true
    }
  },
  data() {
    return {}
  },
  computed: {},

  methods: {
    delsubmit() {
      this.$emit('delsubmit')
    },
    changeall() {
      this.$emit('changeall')
    },
    changefor() {
      this.$emit('changefor')
    },
    changesuc() {
      this.$emit('changesuc')
    }
  }
}
</script>

<style scoped></style>
